import React from 'react'
import styles from './index.module.less'

interface ModalProps {
    visible: boolean
    onKnow: Function
}

const ShareModal = (props: ModalProps) => {
    const { visible = false, onKnow } = props

    return visible ? (
        <div className={styles.container}>
            <div className={styles.main}>
                <div className={styles.hint}>分享入口在这里哦~</div>
                <div
                    className={styles.know}
                    onClick={() => {
                        if (typeof onKnow === 'function') {
                            onKnow()
                        }
                    }}
                >
                    我知道了
                </div>
            </div>
            <div className={styles.start} />
        </div>
    ) : null
}

export default ShareModal
